package cn.lizemin.demo.thread;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class MyThread02 extends Thread{
    /**线程执行的代码*/
    @Override
    public void run() {
        System.out.println("线程开始执行");
        System.out.println("线程开始执行具体的任务");
        long begin_time = System.currentTimeMillis();
        while (System.currentTimeMillis()-begin_time < 5000){
            //假设做了5秒钟的任务
        }
        System.out.println("线程执行完毕");

    }
}
